﻿using System;

namespace Civic.Platform.Teach.Dao.Base
{
    public class PubConstant
    {
        /// <summary>
        /// 获取连接字符串
        /// </summary>
        public static string ConnectionString
        {
            get
            {
                try
                {
                    string _connectionString = AppConfigurtaionServices.Configuration["ConnectionStrings:orcl_ORACLE"];
                    return _connectionString;
                }
                catch (Exception e)
                {
                    throw e;
                }
            }
        }
        public static string ConnectionStringHMES
        {
            get
            {
                try
                {
                    string _connectionString = AppConfigurtaionServices.Configuration["ConnectionStrings:orcl_ORACLE_hmes"];
                    return _connectionString;
                }
                catch (Exception e)
                {
                    throw e;
                }
            }
        }
        public static string ConnectionStringCMES
        {
            get
            {
                try
                {
                    string _connectionString = AppConfigurtaionServices.Configuration["ConnectionStrings:orcl_ORACLE_cmes"];
                    return _connectionString;
                }
                catch (Exception e)
                {
                    throw e;
                }
            }
        }

        public static string ConnectionString_MySQL
        {
            get
            {
                try
                {
                    string _connectionString = AppConfigurtaionServices.Configuration["ConnectionStrings:ConnectionString_MYSQL"];
                    return _connectionString;
                }
                catch (Exception e)
                {
                    throw e;
                }
            }
        }

        public static string ConnectionString_NpgSQL
        {
            get
            {

                string _connectionString = AppConfigurtaionServices.Configuration["ConnectionStrings:ConnectionString_NpgSQL"];
                return _connectionString;
            }
        }

    }
}
